<?php

namespace App\Models\Factory\V2;


use App\Helpers\RestResponseFactory;
use App\Models\AbsModelFactory;
use App\Models\Orm\Activity;
use App\Models\Orm\User;


/**
 * 关于产品的工厂
 * Class ProductFactory
 * @package App\Models\Factory
 */
class ActivityFactory extends AbsModelFactory
{

    /**
     * 筛选
     * @param $identity
     * @param $labels
     * @param $amount
     * @return \Illuminate\Database\Eloquent\Collection|static[]
     */
    public static function getActivity($type)
    {
        $query = Activity::where('status',1);
        if($type == 1)
        {
            $data['activity'] = $query  ->where('fund','!=',0)->get();
        }

        return $data ? $data : '';
    }
}